package test
{
	import com.greensock.TweenLite;
	import com.greensock.easing.Linear;
	
	import flash.display.Sprite;
	
	import globals.$athena;
	
	import slices.FunctionSlice;
	import timeslice.LoadEmbedFont;
	
	import ui.OptionDialog;

	[SWF(width="1280", height="720", backgroundColor="0xFFFFFF")]
	
	public class OptionDialogTest extends Sprite
	{
		public var dialog:OptionDialog; 
		
		public function OptionDialogTest()
		{
			super();
			$athena.start(stage);
			var loadFont:LoadEmbedFont = new LoadEmbedFont;
			loadFont.appendNext(new FunctionSlice(onFontLoad));
			$athena.addTimeSlice(loadFont);
		}
		
		public function onFontLoad():void {
			dialog = new OptionDialog();
			dialog.setContent("你到底听没听懂", ["懂个屁", "懂了", "懂不懂不懂"]);
			dialog.x = stage.stageWidth/2;
			dialog.y = stage.stageHeight/3;
			dialog.onSelect = onSelect;
			dialog.display(this);
		}
		
		public function onSelect(i:int):void {
			trace("select " + i);
			dialog.disappear();
		}
	}
}